<?php

declare(strict_types=1);
/**
 * This file is part of Hyperf.
 *
 * @link     https://www.hyperf.io
 * @document https://doc.hyperf.io
 * @contact  group@hyperf.io
 * @license  https://github.com/hyperf/hyperf/blob/master/LICENSE
 */
namespace App\Constants;

use Hyperf\Constants\AbstractConstants;
use Hyperf\Constants\Annotation\Constants;

/**
 * @Constants
 */
class Constant extends AbstractConstants
{
    //角色标识
    const ADMIN='admin';
    const TEACHER='teacher';
    const USER='user';

    //登陆类型
    const USERNAME = 1;
    const PHONE = 2 ;
    const EMAIL = 3;
    const WECHAT = 4;

    //全局真假
    const GLOBAL_TRUE = 2; #真
    const GLOBAL_FALSE = 1; #假

    //源类型
    const SOURCE_ADMIN = 1; #管理员
    const SOURCE_TEACHER = 2; #教师
    const SOURCE_USER = 3; #用户

    //资源类型
    const RESOURCE_TYPE_PICTURE = 1; #图片
    const RESOURCE_TYPE_VIDEO = 2; #视频

    //资源和点赞来源
    const ORIGIN_FOOT = 1; #足迹
    const ORIGIN_WORKS = 2; #作品
    const ORIGIN_ACTIVITY = 3;#活动
    const ORIGIN_NEWS = 4; #新闻

    #积分来源
    const SCORE_ORIGIN_SIGN = 1; #签到
    const SCORE_ORIGIN_ACTIVITY_JOIN = 2; #活动参加
    const SCORE_ORIGIN_ACTIVITY_SHARE = 3; #活动分享
    const SCORE_ORIGIN_MINI_SHARE = 4; #小程序分享
    const SCORE_ORIGIN_FOOT_PUBLISH = 5; #足迹发布
    const SCORE_ORIGIN_FOOT_EXCELLENT = 6; #优秀足迹

    //足迹可见度
    const FOOT_PUBLIC = 2;
    const FOOT_PRIVATE = 1;

    //积分方向
    const DIRECTION_DEC = 1; #减少
    const DIRECTION_INC = 2; #增加

    //活动类型
    const ACTIVITY_TYPE_GROUP = 1; #团购
    const ACTIVITY_TYPE_SPEED = 2; #抢购
    const ACTIVITY_TYPE_LIMIT = 3; #限购

    //活动显示
    const ACTIVITY_NOT_SHOW = 1; #不显示
    const ACTIVITY_SHOW = 2; #显示

    //活动状态
    const ACTIVITY_STATUS_NORMAL = 1; #正常
    const ACTIVITY_STATUS_FINISH = 2; #结束

    //支付渠道
    const PAY_CHANNEL_SCORE = 1; #积分
    const PAY_CHANNEL_WECHAT = 2; #微信
    const PAY_CHANNEL_ALIPAY = 3; #支付宝

    //支付状态
    const PAY_STATUS_WAIT = 1; #待支付
    const PAY_STATUS_SUCCESS = 2; #支付成功
    const PAY_STATUS_REFUND = 3; #退款

    //订单状态
    const ORDER_STATUS_WAIT = 1; #待支付
    const ORDER_STATUS_UNUSE = 2; #未使用
    const ORDER_STATUS_USE = 3; #已使用
    const ORDER_STATUS_UNAVAILABLE = 4; #已失效
}
